<template>
  <el-icon :size="size" :color="color">
    <component :is="icon"></component>
  </el-icon>
</template>

<script lang="ts" setup>
// 常规封装
withDefaults(
  defineProps<{
    icon: string;
    size?: number | string;
    color?: string;
  }>(),
  {
    size: 30,
    color: "red",
  }
);
</script>

<style lang="scss" scoped></style>
